<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">

        class obj{
            constructor(){
                console.log('构造函数被执行了！');
            }
            add(a,b){
                return a + b;
            }
        }
        var o = new obj();
        console.log(o.add(5,8));

</script>
<!--<script type="module">-->

<!--    class Cala{-->
<!--        constructor(){-->
<!--            console.log('Cala constructor')-->
<!--        }-->
<!--        add(a,b){-->
<!--            return a + b;-->
<!--        }-->
<!--    }-->
<!--    var c = new Cala();-->
<!--    console.log(c.add(5,8));-->


<!--</script>-->

</body>
</html>